﻿using System;
using System.Collections;
using System.Collections.Generic;

public static class ResponseCode_PaymentPaySuccess
{
    // 支付收据验证成功并给出奖品
    public const int success = 0;
    // 支付收据验证失败 -> 弹出收据验证失败
    public const int verifyReceiptFail = -1;
    // 支付收据验证超时 -> 弹出验证超时 联系游戏客服或游戏运营
    public const int verifyReceiptTimeout = -12;
}


public class Request_PaymentValidate : RequestBase 
{
    public Request_PaymentValidate()
    {
        this.MessagePacket.key = "PaymentValidate";
        
        this.timeOutSeconds = 30 ;//30秒
    }

    public override bool needResponse => true;

    public PaymentValidateData validateData;
    protected override ISerialize requestData => validateData;

    public override ResponseData NewResponseData() => new PaymentValidateResponseData();

    //public override ResponseBase GetResponseHandler()
    //{
    //    return  new Response_PaymentValidate();
    //}
}

//public class Response_PaymentValidate : ResponseBase
//{
//    public override ResponseData NewResponseData() => new PaymentValidateResponseData();
//    public override void Excuate()
//    {
//        Request_PaymentValidate req = this.request as Request_PaymentValidate;
//        req.onResponse?.Invoke(this);
//    }

//}